package com.onlyphoto.onlymall.mvp.model

import com.onlyphoto.onlymall.api.Urls
import com.onlyphoto.onlymall.base.BaseModel
import com.onlyphoto.onlymall.base.BaseObserver
import com.onlyphoto.onlymall.bean.response.AppUpdateBean
import com.onlyphoto.onlymall.utils.ConfigUtil
import com.onlyphoto.onlymall.utils.RxTransformer


class MSettingImpl : BaseModel() {
    fun getAppUpdateInfo(baseObserver: BaseObserver<AppUpdateBean>) {
        val url = ConfigUtil.instance.getUrl(Urls.VERSION)
        apiService().appUpdate(url)
                .compose(RxTransformer.switchSchedulers(this))
                .subscribe(baseObserver)
    }
}
